package com.suxin.splitter.spring;

import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;

/**
 * @author Tang
 * @classname SplitInvokerRegister
 * @description [  拆分器注册器 ]
 * @date 2022/11/9 16:11
 */
public class SplitInvokerRegister {

    private final Map<Method, SplitService> registerMap = new HashMap<>();

    public SplitInvokerRegister() {
    }

    public SplitService getByMethod(Method method) {
        return registerMap.get(method);
    }

    public void register(Method method, SplitService splitService) {
        registerMap.put(method, splitService);
    }
}
